翻訳と辞書
Words near each other
・ Java Module System
・ Java moss
・ Java mouse-deer
・ Java Naming and Directory Interface
・ Java Native Access
・ Java Native Interface
・ Java Object Oriented Querying
・ Java OpenAL
・ Java OpenGL
・ Java Optimized Processor
・ Java Pacific Film
・ Java package
・ Java Pathfinder
・ Java performance
・ Java Persistence API
Java Persistence Query Language
・ Java pipistrelle
・ Java Platform Debugger Architecture
・ Java Platform, Enterprise Edition
・ Java Platform, Micro Edition
・ Java Platform, Standard Edition
・ Java plum
・ Java Pony
・ Java Portlet Specification
・ Java processor
・ Java razorfish
・ Java remote method invocation
・ Java Remote Method Protocol
・ Java Research License
・ Java resource bundle


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Java Persistence Query Language : ウィキペディア英語版
Java Persistence Query Language

The Java Persistence Query Language (JPQL) is a platform-independent object-oriented query language defined as part of the Java Persistence API (JPA) specification.
JPQL is used to make queries against entities stored in a relational database. It is heavily inspired by SQL, and its queries resemble SQL queries in syntax, but operate against JPA entity objects rather than directly with database tables.
In addition to retrieving objects (SELECT queries), JPQL supports set based UPDATE and DELETE queries.
==Examples==

Example JPA Classes, getters and setters omitted for simplicity.

@Entity
public class Author

@Entity
public class Book

@Entity
public class Publisher

Then a simple query to retrieve the list of all authors, ordered alphabetically, would be:

SELECT a FROM Author a ORDER BY a.firstName, a.lastName

To retrieve the list of authors that have ever been published by XYZ Press:

SELECT DISTINCT a FROM Author a INNER JOIN a.books b WHERE b.publisher.name = 'XYZ Press'

JPQL supports named parameters, which begin with the colon (:). We could write a function returning a list of authors with the given last name as follows:

import javax.persistence.EntityManager;
import javax.persistence.Query;
...
@SuppressWarnings("unchecked")
public List getAuthorsByLastName(String lastName)


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Java Persistence Query Language」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.